package homeWork01;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class propertiesTest {
    public static void main(String[] args) throws IOException {
        //创建Properties对象出来，先用它存储一些键值对数据
        Properties ppt = new Properties();
        ppt.setProperty("brand", "Iphone11Pro Max");
        ppt.setProperty("capacity", "256G");
        ppt.setProperty("price", "10899");
        // 2、把properties对象中的键值对数据存入到属性文件中去
        ppt.store(new FileWriter("homeWork/src/iphone.Properties"),"phoneType");
    }
}
